# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=hivex
pkgver=1.3.24
pkgrel=0
pkgdesc="System for extracting the contents of Windows Registry"
url="https://libguestfs.org/"
arch="all"
license="LGPL-2.1"
makedepends="gettext-dev libxml2-dev readline-dev perl-dev"
checkdepends="bash"
subpackages="$pkgname-dev $pkgname-doc"
source="https://libguestfs.org/download/hivex/hivex-$pkgver.tar.gz"

# secfixes:
#   1.3.19-r2:
#     - CVE-2021-3504

build() {
	./configure \
		--bindir=/usr/bin \
		--libdir=/usr/lib \
		--prefix=/usr \
		--disable-rpath \
		--disable-perl \
		--disable-ruby \
		--disable-ocaml \
		--disable-python \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
4b9be259e0359344aee2dce1e4df56d928b0e429abcc099479ba95b2940fb80cd285f22e6a914902bcc716e8b4b528f204bea10977913fc701ae45aacb66669b  hivex-1.3.24.tar.gz
"
